package cn.androidlongs.study.user.dao;

import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

import cn.androidlongs.study.user.vo.UserModel;

public class UserDao extends HibernateDaoSupport{

    public UserModel queryUserFromNameAndPas(String name, String password) {
	String hql = "from UserModel where userName = ? and password = ? ";
	List<UserModel> list = this.getHibernateTemplate().find(hql, name,password);
	if(list != null && list.size() > 0){
		return list.get(0);
	}
	return null;
    }

}
